package bookstudytest;

/**
 * Created by swordbone on 2017/12/12.
 */
public class AssertTest {

    public static void main(String[] args){
//        new AssertTest().set(23323);
        int a = 12;
        AssertTest at= new AssertTest();
        at.set(a);
//        try{
//            assert a<0:"a的值大于等于0";
//        }catch (AssertionError assertionError){
//            System.out.println("a的值大于等于0");
//        }

    }
    public void set(int a){

        assert a <= 0 :"a的值大于0";
        System.out.println(a);
    }
}
